Optimal. Leaf size=46 \[ \frac{\sec ^4(x)}{4 a}+\frac{\tanh ^{-1}(\sin (x))}{8 a}-\frac{\tan (x) \sec ^3(x)}{4 a}+\frac{\tan (x) \sec (x)}{8 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.126852, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3872, 2835, 2606, 30, 2611, 3768, 3770} \[ \frac{\sec ^4(x)}{4 a}+\frac{\tanh ^{-1}(\sin (x))}{8 a}-\frac{\tan (x) \sec ^3(x)}{4 a}+\frac{\tan (x) \sec (x)}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2835
Rule 2606
Rule 30
Rule 2611
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec ^3(x)}{a+a \csc (x)} \, dx &=\int \frac{\sec ^2(x) \tan (x)}{a+a \sin (x)} \, dx\\ &=\frac{\int \sec ^4(x) \tan (x) \, dx}{a}-\frac{\int \sec ^3(x) \tan ^2(x) \, dx}{a}\\ &=-\frac{\sec ^3(x) \tan (x)}{4 a}+\frac{\int \sec ^3(x) \, dx}{4 a}+\frac{\operatorname{Subst}\left (\int x^3 \, dx,x,\sec (x)\right )}{a}\\ &=\frac{\sec ^4(x)}{4 a}+\frac{\sec (x) \tan (x)}{8 a}-\frac{\sec ^3(x) \tan (x)}{4 a}+\frac{\int \sec (x) \, dx}{8 a}\\ &=\frac{\tanh ^{-1}(\sin (x))}{8 a}+\frac{\sec ^4(x)}{4 a}+\frac{\sec (x) \tan (x)}{8 a}-\frac{\sec ^3(x) \tan (x)}{4 a}\\ \end{align*}
Mathematica [A] time = 0.049822, size = 25, normalized size = 0.54 \[ \frac{\frac{1}{1-\sin (x)}+\frac{1}{(\sin (x)+1)^2}+\tanh ^{-1}(\sin (x))}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 44, normalized size = 1. \begin{align*}{\frac{1}{8\,a \left ( \sin \left ( x \right ) +1 \right ) ^{2}}}+{\frac{\ln \left ( \sin \left ( x \right ) +1 \right ) }{16\,a}}-{\frac{1}{8\,a \left ( \sin \left ( x \right ) -1 \right ) }}-{\frac{\ln \left ( \sin \left ( x \right ) -1 \right ) }{16\,a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.952153, size = 73, normalized size = 1.59 \begin{align*} -\frac{\sin \left (x\right )^{2} + \sin \left (x\right ) + 2}{8 \,{\left (a \sin \left (x\right )^{3} + a \sin \left (x\right )^{2} - a \sin \left (x\right ) - a\right )}} + \frac{\log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\log \left (\sin \left (x\right ) - 1\right )}{16 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.49542, size = 220, normalized size = 4.78 \begin{align*} -\frac{2 \, \cos \left (x\right )^{2} -{\left (\cos \left (x\right )^{2} \sin \left (x\right ) + \cos \left (x\right )^{2}\right )} \log \left (\sin \left (x\right ) + 1\right ) +{\left (\cos \left (x\right )^{2} \sin \left (x\right ) + \cos \left (x\right )^{2}\right )} \log \left (-\sin \left (x\right ) + 1\right ) - 2 \, \sin \left (x\right ) - 6}{16 \,{\left (a \cos \left (x\right )^{2} \sin \left (x\right ) + a \cos \left (x\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sec ^{3}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.38791, size = 65, normalized size = 1.41 \begin{align*} \frac{\log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\log \left (-\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\sin \left (x\right )^{2} + \sin \left (x\right ) + 2}{8 \, a{\left (\sin \left (x\right ) + 1\right )}^{2}{\left (\sin \left (x\right ) - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]